// vite.config.js
import { fileURLToPath, URL } from "node:url";
import { defineConfig, loadEnv } from "file:///S:/Workstage/Gzzxue/elec-student/node_modules/vite/dist/node/index.js";
import vue from "file:///S:/Workstage/Gzzxue/elec-student/node_modules/@vitejs/plugin-vue/dist/index.mjs";
import AutoImport from "file:///S:/Workstage/Gzzxue/elec-student/node_modules/unplugin-auto-import/dist/vite.js";
import Components from "file:///S:/Workstage/Gzzxue/elec-student/node_modules/unplugin-vue-components/dist/vite.js";
import { ElementPlusResolver } from "file:///S:/Workstage/Gzzxue/elec-student/node_modules/unplugin-vue-components/dist/resolvers.js";
var __vite_injected_original_import_meta_url = "file:///S:/Workstage/Gzzxue/elec-student/vite.config.js";
var vite_config_default = defineConfig(({ command, mode }) => {
  const env = loadEnv(mode, process.cwd(), "");
  return {
    // 环境变量通常可以从 process.env 获得。注意 Vite 默认是不加载 .env 文件的
    // 当你的确需要时，你可以使用 Vite 导出的 loadEnv 函数来加载指定的 .env 文件。
    define: {
      __APP_ENV__: JSON.stringify(env.APP_ENV),
      "process.env": env
    },
    target: "web",
    plugins: [
      vue(),
      // 自动导入Element Plus组件
      AutoImport({
        resolvers: [ElementPlusResolver()]
      }),
      Components({
        resolvers: [ElementPlusResolver()]
      })
    ],
    resolve: {
      alias: {
        "@": fileURLToPath(new URL("./src", __vite_injected_original_import_meta_url))
      }
    },
    // 配置前端服务地址和端口
    server: {
      host: "0.0.0.0",
      port: 8022,
      // 是否开启 https
      https: false,
      // 设置反向代理，跨域
      proxy: {
        "/shop115": {
          // 后台地址
          target: "https://api.gzzxue.com",
          changeOrigin: true
          // rewrite: path => path.replace(/^\/api1/, '')
        },
        "/videos": {
          // 后台地址
          target: "http://v.qian.gzzsu.com",
          changeOrigin: true,
          rewrite: (path) => path.replace(/^\/videos/, "/shop")
        },
        "/imgs": {
          // 后台地址
          target: "http://img.qian.gzzsu.com",
          changeOrigin: true,
          rewrite: (path) => path.replace(/^\/imgs/, "/shop")
        },
        "/video": {
          // 后台地址
          target: "http://img.ele.gzzxue.com",
          changeOrigin: true,
          rewrite: (path) => path.replace(/^\/video/, "/assets")
        },
        "/img": {
          // 后台地址
          target: "http://img.ele.gzzxue.com",
          changeOrigin: true,
          rewrite: (path) => path.replace(/^\/img/, "/assets")
        }
      }
      // proxy: {
      //   '/shop115': {
      //     // 后台地址
      //     target: 'https://api.gzzxue.com',
      //     changeOrigin: true,
      //     // rewrite: path => path.replace(/^\/api1/, '')
      //   },
      //   '/videos': {
      //     // 后台地址
      //     target: 'http://v.qian.gzzsu.com',
      //     changeOrigin: true,
      //     rewrite: path => path.replace(/^\/videos/, '/shop'),
      //   },
      //   '/imgs': {
      //     // 后台地址
      //     target: 'http://img.qian.gzzsu.com',
      //     changeOrigin: true,
      //     rewrite: path => path.replace(/^\/imgs/, '/shop')
      //   }
      //   ,
      //   '/video': {
      //     // 后台地址
      //     target: 'http://img.ele.gzzxue.com',
      //     changeOrigin: true,
      //     rewrite: path => path.replace(/^\/video/, '/assets')
      //   },
      //   '/img': {
      //     // 后台地址
      //     target: 'http://img.ele.gzzxue.com',
      //     changeOrigin: true,
      //     rewrite: path => path.replace(/^\/img/, '/assets')
      //   },
      // }
    }
  };
});
export {
  vite_config_default as default
};
//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsidml0ZS5jb25maWcuanMiXSwKICAic291cmNlc0NvbnRlbnQiOiBbImNvbnN0IF9fdml0ZV9pbmplY3RlZF9vcmlnaW5hbF9kaXJuYW1lID0gXCJTOlxcXFxXb3Jrc3RhZ2VcXFxcR3p6eHVlXFxcXGVsZWMtc3R1ZGVudFwiO2NvbnN0IF9fdml0ZV9pbmplY3RlZF9vcmlnaW5hbF9maWxlbmFtZSA9IFwiUzpcXFxcV29ya3N0YWdlXFxcXEd6enh1ZVxcXFxlbGVjLXN0dWRlbnRcXFxcdml0ZS5jb25maWcuanNcIjtjb25zdCBfX3ZpdGVfaW5qZWN0ZWRfb3JpZ2luYWxfaW1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